//打造store,applyMiddleware是用来调用中间件的
import {createStore,applyMiddleware} from 'redux'
//引入reducer数据管理并将它传给store
import rootRenducer from '../reducers/index'
//引入浏览器里的第三方插件
import {composeWithDevTools} from 'redux-devtools-extension'
//引入中间件，中间件就是具有特殊含义的封装函数,中间件是需要使用工具调用的
import thunk from 'redux-thunk'
//react 常用中间件 redux-thunk  redux-sage redux-promise
// const store = createStore(rootRenducer,composeWithDevTools(中间件))
const store = createStore(rootRenducer,composeWithDevTools(applyMiddleware(thunk)))
export default store